import request from '@/utils/request'

export function insert (data) {
    return request({
        url: '/api/server/sysRole/insert',
        method: 'post',
        data: data
    })
}


export function update (data) {
    return request({
        url: '/api/server/sysRole/update',
        method: 'post',
        data: data
    })
}


export function queryByPage (data) {
    return request({
        url: '/api/server/sysRole/queryByPage',
        method: 'post',
        data: data
    })
}

export function deleteById (params) {
    return request({
        url: '/api/server/sysRole/deleteById',
        method: 'get',
        params: params
    })
}


export function queryList (params) {
    return request({
        url: '/api/server/sysRole/queryList',
        method: 'get',
        params: params
    })
}

export function queryRoleList (data) {
    return request({
        url: '/api/server/sysPermission/queryByPage',
        method: 'post',
        data: data
    })
}

export function batchInsert (data) {
    return request({
        url: '/api/server/sysPermission/batchInsert',
        method: 'post',
        data: data
    })
}

export function queryListByUserId (data) {
    return request({
        url: '/api/server/sysPermission/queryListByUserId',
        method: 'post',
        data: data
    })
}